package abe.gui.listeners;

import java.awt.*;
import java.awt.event.*;

/** A listener that you attach to the top-level Frame or JFrame of
 *  your application, so quitting the frame exits the application.
 *  1998-99 Marty Hall, http://www.apl.jhu.edu/~hall/java/
 */

public class ExitListener extends WindowAdapter implements KeyListener{
  public void windowClosing(WindowEvent event) {
    System.exit(0);
  }

@Override
public void keyPressed(KeyEvent e) {
	System.out.println(e.getKeyCode());
	
}

@Override
public void keyReleased(KeyEvent e) {
	System.out.println(e.getKeyCode());
	
}

@Override
public void keyTyped(KeyEvent e) {
	System.out.println(e.getKeyCode());
	
}
}
